﻿@{
    if (RequestHelper.QueryString("use") != "include")
    {
        ViewBag.Title = "Option";
        Layout = "~/Views/Shared/_Admin.cshtml";
    }
    string anchor = RequestHelper.QueryString("go");
}
<link type="text/css" href="/content/styles/option.css" rel="stylesheet" />
<div class="hd-title">
    <h1 class="option">常规配置</h1>
</div>
<div id="message" class="alert">
    <button type="button" class="close" data-dismiss="alert">×</button>
    <span></span>
</div>
@switch (anchor)
{
    default:
    <div class="form-horizontal">
        <div class="control-group">
            <label for="site_name" class="control-label">站点标题</label>
            <div class="controls">
                <input id="site_name" type="text" placeholder="站点标题" value="@Setting.SiteName">
            </div>
        </div>
        <div class="control-group">
            <label for="site_description" class="control-label">副标题（站点描述）</label>
            <div class="controls">
                <input id="site_description" type="text" placeholder="副标题(站点描述)" value="@Setting.SiteDescription">
                <p class="help-block">用简洁的文字描述本站点。</p>
            </div>
        </div>
        <div class="control-group">
            <label for="site_author" class="control-label">作者</label>
            <div class="controls">
                <input id="site_author" type="text" placeholder="作者" value="@Setting.MetaAuthor">
            </div>
        </div>
        <div class="control-group">
            <label for="site_url" class="control-label">站点地址（URL）</label>
            <div class="controls">
                <input id="site_url" type="text" placeholder="站点地址（URL）" value="@Setting.SiteUrl">
            </div>
        </div>
        <div class="control-group">
            <label for="site_status" class="control-label">站点开放状态</label>
            <div class="controls">
                <select id="site_status">
                    <option value="0"@(Setting.SiteStatus == SiteStatus.Open ? " selected=\"selected\"" : string.Empty)>Open</option>
                    <option value="1"@(Setting.SiteStatus == SiteStatus.Close ? " selected=\"selected\"" : string.Empty)>Close</option>
                </select>
            </div>
        </div>
        <div class="control-group">
            <label for="meta_keywords" class="control-label">关键词（Keywords）</label>
            <div class="controls">
                <input id="meta_keywords" type="text" placeholder="关键词（Keywords）" value="@Setting.MetaKeywords">
            </div>
        </div>
        <div class="control-group">
            <label for="meta_description" class="control-label">描述（Description）</label>
            <div class="controls">
                <input id="meta_description" type="text" placeholder="描述（Description）" value="@Setting.MetaDescription">
            </div>
        </div>
        <div class="control-group">
            <label for="charset" class="control-label">字符编码（Charset）</label>
            <div class="controls">
                <select id="charset">
                    <option value="utf-8"@(Setting.CharSet == "utf-8" ? " selected=\"selected\"" : string.Empty)>UTF-8</option>
                    <option value="gb2312"@(Setting.CharSet == "gb2312" ? " selected=\"selected\"" : string.Empty)>GBK</option>
                </select>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">注册</label>
            <div class="controls">
                <label class="checkbox">
                    <input id="enable_register" type="checkbox"@(Setting.EnableReg ? " checked=\"checked\"" : string.Empty)>允许任何人注册</label>
            </div>
        </div>
        <div class="control-group">
            <label for="upload_root" class="control-label">附件路径格式</label>
            <div class="controls">
                @(Config.SiteUrl)Content/<input id="upload_root" class="input-small" type="text" value="@Setting.UploadRoot">/yyyy/MM/fileName.ext
            </div>
        </div>
        <div class="control-group">
            <div class="controls">
                <input id="btn_submit" class="btn btn-primary" type="button" value="保存更改">
            </div>
        </div>
    </div>
        break;
    case "seo":
        break;
    case "permalink":
        break;
    case "write":
        break;
    case "read":
        break;
    case "discussion":
        break;
    case "smtp":
        break;
}

